package com.ar4j.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Defines the behavior of a lookup method (findBy, findAllBy, countBy) on an ActiveRecord 
 */
@Target({ ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface LookupMethod {

  /**
   * @return property names of the parameters defined in the method arguments
   */
  String[] value() default { };
  
  /**
   * @return default lookup parameter name/value pairs to be used during the lookup
   */
  DefaultLookupParameter[] defaultParameters() default { };
  
}
